<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>v-for使用过程中绑定key</title>
</head>
<body>
<div id="app">
  <!--v-for遍历数组中时，给数组中插入数值，这时添加绑定:key会提高插入性能，作用：是为了更高效的更新虚拟dom-->
  <ul>
    <li v-for="item in nums" :key="item">{{item}}</li>
  </ul>
</div>
<script src="../js/vue.js"></script>
<script>
  const app = new Vue({
    el: '#app',
    data: {
      nums: ['A','B','C','D','E']
    }
  });
</script>
</body>
</html>
